Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Improves error messages for toHaveText and toContainElement matchers #281

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jwark
Copy link

@jwark jwark commented Feb 29, 2016

Improves error messages for toHaveText and toContainElement matchers when expectation not met.

E.g.:
expect($('.page-title')).toHaveText('My header');

Expected ({ 0: HTMLNode, length: 1, prevObject: ({ 0: HTMLNode, context: HTMLNode, length: 1 }), context: HTMLNode, selector: '.page-title' }) to have text 'My header'.

Expected element '<h1 class="my-class">My heading</h1>' to have text My header

@uzikilon
Copy link

+1

@seansellek
Copy link

Any update on this? It's been over a year and this is extremely useful

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants